package com.xoa.controller.financialManage.charge;


import com.xoa.model.financialManage.charge.ChargePermissionWithBLOBs;
import com.xoa.service.financialManage.charge.ChargePermissionService;
import com.xoa.util.ToJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 权限设置
 * </p>
 *
 * @author liujian
 * @since 2020-04-23
 */
@RestController
@RequestMapping("/chargePermission")
public class ChargePermissionController {

    @Autowired
    private ChargePermissionService chargePermissionService;

    //查询
    @RequestMapping("/findPermissionAll")
    public ToJson findPermissionAll(ChargePermissionWithBLOBs chargePermission, Integer page, Integer limit){
        return chargePermissionService.findPermissionAll(chargePermission,page,limit);
    }

    //根据ID查询
    @RequestMapping("/findPermissionById")
    public ToJson findPermissionById(ChargePermissionWithBLOBs chargePermission){
        return chargePermissionService.findPermissionById(chargePermission);
    }

    //编辑和新增
    @RequestMapping("/enidOrInsertPermission")
    public ToJson enidOrInsertPermission(ChargePermissionWithBLOBs chargePermission){
        return chargePermissionService.enidOrInsertPermission(chargePermission);
    }

    //删除
    @RequestMapping("/delPermissionIds")
    public ToJson delPermissionIds(ChargePermissionWithBLOBs chargePermission){
        return chargePermissionService.delPermissionIds(chargePermission);
    }


}
